import request from '@/utils/request'

export function resetPswAPI(id) {
  return request({
    url: '/park/sys/user/resetPwd',
    data: { id },
    method: 'put'
  })
}
export function getRolesAPI() {
  return request({
    url: '/park/sys/role'
  })
}
export const getTreeListAPI = () => {
  return request({
    url: '/park/sys/permision/all/tree'
  })
}
export const getRoleDetailAPI = (id) => {
  return request({
    url: '/park/sys/role/' + id
  })
}
export const getUserListAPI = (id) => {
  return request({
    url: '/park/sys/roleUser/' + id
  })
}
export const addRoleAPI = (data) => {
  return request({
    url: '/park/sys/role',
    method: 'post',
    data
  })
}
export const updateRoleAPI = (data) => {
  return request({
    url: '/park/sys/role',
    method: 'put',
    data
  })
}
export const delRoleAPI = (id) => {
  return request({
    url: '/park/sys/role/' + id,
    method: 'delete'
  })
}

